package com.noreg;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.noreg.interfaces.IParser;
import com.noreg.timmer.TaskList;


/**
 * @author Jeson
 * @blog:http://www.ij2ee.com
 * @date:2011-4-16 上午10:39:37
 * @version :1.0
 * 
 */
public class WebStart {
	public static void main(String[] args) throws Exception {
		ApplicationContext ctx = new ClassPathXmlApplicationContext(
				"classpath:com/noreg/spring/timer.xml");
		// IParser rp = (IParser) ctx.getBean("cnblogsTag");
		// rp.start();
		TaskList list = (TaskList) ctx.getBean("taskListBean");

		if (list != null) {
			List<IParser> cps = list.getTaskList();
			for (IParser cp : cps) {
				cp.start();
			}
		}
	}
}
